package cn.hiapi.shop.query;

import cn.hiapi.basic.jpa.pageable.QueryWrapper;
import cn.hiapi.basic.jpa.query.BasicQuery;
import cn.hiapi.shopkeeper.enums.ActivityType;
import lombok.Getter;
import lombok.Setter;

/**
 * @author AdinZ
 * @date 2022/12/13 0:40
 */
@Setter
@Getter
public class ActivityQuery extends BasicQuery {
    private Integer status;
    private ActivityType type;
    private long shopId;

    private Long cid;

    @Override
    public QueryWrapper getQueryWrapper() {
        QueryWrapper wrapper = super.getBasicQueryWrapper();
        wrapper.eq("shopId", shopId);
        wrapper.eq("type", type);
        wrapper.eq("cid", cid);
        wrapper.eq("status", status);
        return wrapper;
    }
}
